package cn.com.infohold.smartcity.data;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import cn.com.infohold.smartcity.R;


/**
 * Created by Mr.Fan on 2016/1/11.
 */
public class Constants {


    public static final int ACTIVITY_REQUEST_CAMERA = 0x3001;
    public static final int ACTIVITY_REQUEST_ALBUM = 0x3002;
    public static final int ACTIVITY_REQUEST_CROP = 0x3003;

    public static final int ITEMS_PER_PAGE = 20;

    public static final int ACTIVITY_REQUEST_MESSAGE = 0x3101;
    public static final int ACTIVITY_REQUEST_MESSAGE_DETAIL = 0x3102;

    public static final class Weex {
        public static final String DIST_NAME_DEFAULT = "weex";
    }


    public static final class Case {
        public static final String TYPE_NEW = "0";
        public static final String TYPE_TODO = "1";

        public static final List<String> LABELS;
        //public static final Map<String, String> ICONS;

        static {
            List<String> labels = new ArrayList<>();
            labels.add(Constants.Case.TYPE_NEW);
            labels.add(Constants.Case.TYPE_TODO);
            LABELS = Collections.unmodifiableList(labels);


//            Map<String, String> map = new HashMap<>();
//            map.put(Constants.Case.TYPE_NEW, MarkerUtils.getCaseIcon(R.drawable.marker_tudi));
//            map.put(Constants.Case.TYPE_TODO, MarkerUtils.getCaseIcon(R.drawable.marker_tudi));
//            ICONS = Collections.unmodifiableMap(map);

        }

        public static int getTypeDrawable(String type) {
            switch (type) {
                case TYPE_NEW:
                    return R.drawable.icon_status_new;
                case TYPE_TODO:
                    return R.drawable.icon_status_todo;
            }
            return 0;
        }

        public static String getType(String type) {

            switch (type) {
                case "旱田":
                    return Constants.Case.TYPE_NEW;
                case "水田":
                    return Constants.Case.TYPE_TODO;
            }
            return null;
        }


    }

    public static final class Personnel {
        public static final String TYPE_ONLINE = "在线";
        public static final String TYPE_OFFLINE = "离线";

//        public static final String MARKER_ONLINE = MarkerUtils.getManIcon(R.drawable.marker_man_online);
//        public static final String MARKER_OFFLINE = MarkerUtils.getManIcon(R.drawable.marker_man_offline);


        public static final List<String> LABELS;

        static {
            List<String> labels = new ArrayList<>();
            labels.add(Constants.Personnel.TYPE_ONLINE);
            labels.add(Constants.Personnel.TYPE_OFFLINE);
            LABELS = Collections.unmodifiableList(labels);
        }
    }
}
